<template>
<div class="page">
  <router-view class='content'></router-view>
</div>
</template>


<script>
import bottomBar from './common/BottomBar'

export default {
	name: 'page',
  components: {
    bottomBar
  },
  data() {
    return {
      bottomSelectedIndex: 0,
      bottomBarData: [{
          value: '资产分析',
          path: '/pages/Asset',
          normalImgSrc: require('../assets/images/analysis-asset2x.png'),
          activeImgSrc: require('../assets/images/analysis-asset-sel2x.png')
        },
        {
          value: '证券分析',
          path: '/pages/Stock',
          normalImgSrc: require('../assets/images/analysis-month2x.png'),
          activeImgSrc: require('../assets/images/analysis-month-sel2x.png')
        },
        {
          value: '月度分析',
          path: '/pages/Month',
          normalImgSrc: require('../assets/images/analysis-stock2x.png'),
          activeImgSrc: require('../assets/images/analysis-stock-sel2x.png')
        }
      ]
    }
  },
  computed:{
    title: function(){
      return this.bottomSelectedIndex !== '' ? this.bottomBarData[this.bottomSelectedIndex].value : '';
    }
  },
  created() {
    let self = this;
    this.init();
  },
  methods: {
    onBottomSelected: function(item, index){
      this.bottomSelectedIndex = index;
      this.$router.replace(item.path);
    },
    reload: function() {

    },
    init() {

    }
  }
}

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
